package com.dimbottom.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;

@Data
@TableName("student")
@ApiModel(description = "学号存储对象")
public class Student {
    @TableId
    @ApiModelProperty(value = "学号", example = "18401010401")
    @Pattern(regexp = "^(17|18|19|20)[1-5]\\d{6}(?:0[1-9]|[1-3][0-9])$",
            message = "student code can't be empty or incorrectly formatted")
    private String studentCode;
    @ApiModelProperty(value = "等级", example = "0")
    private int level;
}
